import numpy as np

if __name__ == '__main__':
    a = np.array([[1, 2], [3, 4]])
    b = np.array([[5, 6]])

    # 按照行的方向
    c = np.concatenate((a, b), axis=0)
    print(c)

    #  The arrays must have the same shape, except in the dimension corresponding to `axis`
    # 按照列的方向
    d = np.concatenate((a, b.T), axis=1)
    print(d)


    e = np.concatenate((a, b))
    print(e)

    t = np.array([[5, 6], [7, 8]])
    f = np.concatenate((a, t))
    print(f)





